package com.ruoyi.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mapper.TycResearchZdMapper;
import com.ruoyi.domain.TycResearchZd;
import com.ruoyi.service.ITycResearchZdService;
import com.ruoyi.common.core.text.Convert;

/**
 * 科研成果类型Service业务层处理
 * 
 * @author ruoyi
 * @date 2020-09-14
 */
@Service
public class TycResearchZdServiceImpl implements ITycResearchZdService 
{
    @Autowired
    private TycResearchZdMapper tycResearchZdMapper;

    /**
     * 查询科研成果类型
     * 
     * @param id 科研成果类型ID
     * @return 科研成果类型
     */
    @Override
    public TycResearchZd selectTycResearchZdById(Long id)
    {
        return tycResearchZdMapper.selectTycResearchZdById(id);
    }

    /**
     * 查询科研成果类型列表
     * 
     * @param tycResearchZd 科研成果类型
     * @return 科研成果类型
     */
    @Override
    public List<TycResearchZd> selectTycResearchZdList(TycResearchZd tycResearchZd)
    {
        return tycResearchZdMapper.selectTycResearchZdList(tycResearchZd);
    }

    /**
     * 新增科研成果类型
     * 
     * @param tycResearchZd 科研成果类型
     * @return 结果
     */
    @Override
    public int insertTycResearchZd(TycResearchZd tycResearchZd)
    {
        return tycResearchZdMapper.insertTycResearchZd(tycResearchZd);
    }

    /**
     * 修改科研成果类型
     * 
     * @param tycResearchZd 科研成果类型
     * @return 结果
     */
    @Override
    public int updateTycResearchZd(TycResearchZd tycResearchZd)
    {
        return tycResearchZdMapper.updateTycResearchZd(tycResearchZd);
    }

    /**
     * 删除科研成果类型对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteTycResearchZdByIds(String ids)
    {
        return tycResearchZdMapper.deleteTycResearchZdByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除科研成果类型信息
     * 
     * @param id 科研成果类型ID
     * @return 结果
     */
    @Override
    public int deleteTycResearchZdById(Long id)
    {
        return tycResearchZdMapper.deleteTycResearchZdById(id);
    }
    /**
     * 查询专利字典 根据等级
     *
     * @param Aclass 科研成果类型Aclass
     * @return 科研成果类型
     */
    @Override
    public TycResearchZd selectTycResearchZdGrade(String Aclass) {
        return tycResearchZdMapper.selectTycResearchZdGrade(Aclass);
    }
}
